interface FormItemProps {
  id?: number;
  /** 用于判断是`新增`还是`修改` */
  title: string;
  higherDeptOptions: Record<string, unknown>[];
  appImage: string;
  appName: string;
  appClass: number;
  appDescript: string;
  appSort: number;
  isShow: number;
  appRange: string;
  addUser: number;
  addTime: Date;
  appType?: number;
  appPath: string;
  isWebShow: boolean;
  isPhoneShow: boolean;
  isIndexShow: boolean;
}
/*
classID?: {
    id?: number;
    className?: string;
  };
*/

interface appModel {
  id?: number;
  appID?: number;
  showTable: string;
  editTable: string;
  modeType: string;
  assField: string;
  showType: string;
  addTime: Date;
}

interface appRoleInfo {
  id?: number;
  modeID?: number;
  roleID?: number;
  filterField: any[];
  menuRole: string;
  pcShowField: any[];
  phoneShowFiled: any[];
  dataRole: string;
  importField: any[];
  buttonRole: any[];
  hideFieds: any[];
  disableFields: any[];
  addTime: Date;
  editCode: number;
}

interface FormProps {
  formInline: FormItemProps;
}

interface RoleFormItemProps {
  username: string;
  nickname: string;
  /** 角色列表 */
  roleOptions: any[];
  /** 选中的角色列表 */
  ids: Record<number, unknown>[];
}
interface RoleFormProps {
  formInline: RoleFormItemProps;
}

interface ModelInfo {
  appID?: bigint;
  appModels: ModeConfig[];
  newModeConfig: ModeConfig[];
  hasModels: boolean;
}
interface ModeConfig {
  modaInfo: appModel;
  roleConfig: appRoleInfo[];
  userRoel: any[];
  //showFieldList: any[];
  appLink: string;
}
interface appFunction {
  id?: bigint;
  modelID?: bigint;
  funName: string;
  funSqlCode: string;
  contrlTable: string;
  funSort: number;
  contrlFalg: number;
  contrlMsg: string;
  addTime: Date;
  funIcon: string;
  addUser?: bigint;
  showType?: string;
}
interface formTable {
  id?: number;
  appName: string;
  appPath?: string;
}

interface funForm {
  id?: number;
}

export type {
  FormItemProps,
  FormProps,
  RoleFormItemProps,
  RoleFormProps,
  appModel,
  appRoleInfo,
  ModelInfo,
  ModeConfig,
  formTable,
  funForm,
  appFunction
};
